package pattern.behavioral.chainofresponsibility;

/**
 * @author: chaoyang.ren  
 * @date:Jun 6, 2017  
 * @time:11:24:09 AM   
 * @email:chaoyang.ren@foxmail.com  
 * @version: 1.0
 */
public class IntegerHandler extends NumberHandler {

	@Override
	public void handleRequest(Number n, HandlerChain hc) {
		if(n instanceof Integer){
			System.out.println("deal with Integer:"+n.toString());
		}else{
			System.out.println("n is not a Integer , continue try another:"+n.toString());
		}
		hc.handle(n);
	}

}

